use std::fmt::{Display, Formatter};

struct Circle {
    radius: i32,
}
impl Display for Circle {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "Circle of radius {}", self.radius)
    }
}
// impl ToString for Circle {
//     fn to_string(&self) -> String {
//         format!("{}", self.radius)
//     }
// }
fn main() {
    let circle = Circle { radius: 32 };
    println!("{}", circle);
    let xi: i32 = "3".parse().unwrap();
    println!("{}", xi);
    println!("{}", "3".parse::<i32>().unwrap());
    let i = "23".parse::<i64>().unwrap();
    println!("{}", i);
}
